﻿Imports System
Imports System.Collections.Generic
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Animation
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes

Namespace Views


    Partial Public Class ViewDataSourceConfigure
        Public Sub New()
            MyBase.New()

            Me.InitializeComponent()

            ' Insert code required on object creation below this point.
        End Sub

        Private Sub Button_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs)
            'TODO: Add event handler implementation here.
            Dim fdlg = New Microsoft.Win32.OpenFileDialog()

            fdlg.Multiselect = True

            If fdlg.ShowDialog() Then

                Dim dconf = TryCast(DataContext, VMDataSourceConfigure)

                If dconf IsNot Nothing Then
                    dconf.Folder = IO.Path.GetDirectoryName(fdlg.FileName)
                End If
            End If
        End Sub
    End Class
End Namespace
